package com.cet.base.exception;

/**
 * @program: cet-practice
 * @description:
 * @author: 陈恩涛
 * @create: 2023-03-24 19:33
 **/
public class ExceptionTest2 {
    public static String output = " ";

    public static void foo(int i) {
        try {
            if (i == 1) {
                throw new Exception();
            }
        } catch (Exception e) {
            output += "2";
            return;
        } finally {
            output += "3";
            return;
        }

        // output += "4";
    }

    public static void main(String[] args) {
        foo(0);
        foo(1);
        System.out.println(output);
    }
}
